#
# PHP-APACHE 7.4 Dockerfile
#

FROM php:7.4-cli

MAINTAINER Dongasai 1514582970@qq.com

RUN apt-get update
RUN apt-get install -y vim wget zip zlib1g-dev  make automake libtool libzip-dev 
#RUN apt-get install -y 
WORKDIR /home


# 安装 oniguruma
ENV ORIGURUMA_VERSION=6.9.6
RUN wget https://hub.fastgit.org/kkos/oniguruma/archive/v${ORIGURUMA_VERSION}.tar.gz -O oniguruma-${ORIGURUMA_VERSION}.tar.gz \
     && tar -zxvf oniguruma-${ORIGURUMA_VERSION}.tar.gz \
     && cd oniguruma-${ORIGURUMA_VERSION} \
     && ./autogen.sh \
     && ./configure \
     &&  make \
     && make install


RUN docker-php-ext-install bcmath mbstring pdo pdo_mysql zip;docker-php-ext-enable pdo pdo_mysql;
RUN pecl install redis \
    && docker-php-ext-enable redis
RUN pecl install swoole && docker-php-ext-enable swoole
RUN pecl install msgpack && docker-php-ext-enable msgpack

# 安装composer 
RUN wget https://mirrors.aliyun.com/composer/composer.phar \
	&& mv composer.phar /usr/local/bin/composer \
	&& chmod +x /usr/local/bin/composer \
	&& composer config -g repo.packagist composer https://mirrors.aliyun.com/composer
COPY php0.ini  /usr/local/etc/php/conf.d/

WORKDIR /var/www/html

